Skip to content

fix(plans)+test: #500 review — OCR rides Full not Compressed; OCR-RT gate exact#502

Merged
AdaWorldAPI merged 1 commit into
mainfrom
claude/wonderful-hawking-lodtql
Jun 16, 2026
Merged

fix(plans)+test: #500 review — OCR rides Full not Compressed; OCR-RT gate exact#502
AdaWorldAPI merged 1 commit into
mainfrom
claude/wonderful-hawking-lodtql

Conversation

@AdaWorldAPI

@AdaWorldAPI AdaWorldAPI commented Jun 16, 2026

Copy link
Copy Markdown
Owner

Addresses the two open review threads on the merged #500.

  • codex P2 (mine): I'd written "post-POC OCR rides Compressed" — but Compressed lacks Energy+Plasticity, so the schema-gated LayoutBlock::to_node_row would silently drop confidence (→Energy) and repair-provenance (→Plasticity). Corrected: OCR rides Full (the only existing preset with the codec residues AND the hot lifecycle columns). The OCR-SCHEMA contract test now asserts Compressed lacks Energy/Plasticity (regression guard) so this can't silently regress.
  • CodeRabbit Major: the OCR-RT reversibility gate was ≥ 99 % — a lossy residue→rank map is not "reversible", so the gate is tightened to 100 % exact; any single miss fails it, and tolerance is moved to a separate quality probe.

ocr-canonical-soa-integration-v1.md + ocr-probes-v1.md + the contract test updated. contract lib green; fmt clean.

https://claude.ai/code/session_01D2WSmezQBNC3bUdHuGfGmo


Generated by Claude Code

Summary by CodeRabbit

Release Notes

  • Documentation

    • Refined OCR integration specifications regarding preset configuration requirements.
    • Updated OCR testing criteria to enforce stricter validation standards.
  • Tests

    • Enhanced test assertions for improved validation rigor and consistency.

…gate is exact

Two review threads on the merged #500:
- codex P2: "post-POC OCR rides Compressed" was wrong — Compressed lacks
  Energy+Plasticity, so the schema-gated transcode would silently drop confidence
  (→Energy) and repair-provenance (→Plasticity). Corrected: OCR rides Full (the only
  preset with the codec residues AND the hot lifecycle columns). The OCR-SCHEMA
  contract test now asserts Compressed lacks Energy/Plasticity (regression guard).
- CodeRabbit Major: OCR-RT reversibility gate tightened 99% → 100% exact (a lossy
  residue→rank map is NOT "reversible"; tolerance moved to a separate quality probe).

https://claude.ai/code/session_01D2WSmezQBNC3bUdHuGfGmo
@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 88a898bd-6bcb-4ee9-9330-fabd44ab4278

📥 Commits

Reviewing files that changed from the base of the PR and between e192266 and d65dcb7.

📒 Files selected for processing (3)
  • .claude/plans/ocr-canonical-soa-integration-v1.md
  • .claude/plans/ocr-probes-v1.md
  • crates/lance-graph-contract/src/ocr.rs

📝 Walkthrough

Walkthrough

The PR corrects the OCR integration plan to specify ValueSchema::Full (not Compressed) as the preset OCR rides, tightens the OCR-RT probe's pass criterion from ≥99% to exact 100% reversibility, and strengthens the ocr_schema_fit_rides_existing_preset_no_new_variant contract test with explicit assertions that Compressed lacks Energy and Plasticity tenants.

Changes

OCR Preset Correction and Probe Tightening

Layer / File(s) Summary
Plan and probe spec: Full preset + 100% RT gate
.claude/plans/ocr-canonical-soa-integration-v1.md, .claude/plans/ocr-probes-v1.md
The integration plan replaces Compressed with Full as the OCR ValueSchema preset, restates the no-new-enum-variant contract rule, and describes the opt-in route via operator or OGAR class. The probe spec removes the ≥99% tolerance threshold and requires exact 100% residue→rank→word round-tripping; any miss now fails the gate.
Contract test: assert Compressed lacks Energy/Plasticity, OCR rides Full
crates/lance-graph-contract/src/ocr.rs
Rewrites the test comment to document the Full-not-Compressed rationale, adds explicit assertions that ValueSchema::Compressed does not contain ValueTenant::Energy or ValueTenant::Plasticity, and updates the explanatory comment to confirm OCR therefore rides Full for the needed hot lifecycle columns.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • AdaWorldAPI/lance-graph#500: Rebaselines OCR plans and records the same ocr_schema_fit_rides_existing_preset_no_new_variant contract-test intent that this PR's assertions directly strengthen.
  • AdaWorldAPI/lance-graph#498: Also touches crates/lance-graph-contract/src/ocr.rs to enforce OCR's ValueSchema preset and tenant expectations around Full vs Compressed.

Poem

🐇 Hop, hop — no more Compressed disguise,
The Full preset is where OCR flies!
Energy and Plasticity must reside,
One hundred percent round-trips, no threshold to hide.
The rabbit checked each tenant with care —
No new enum variants allowed, I declare! 🌿

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main changes: OCR schema preset correction (Full vs Compressed) and tightening of the OCR-RT reversibility gate criteria, with clear reference to the review issue #500.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d65dcb758c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +96 to +100
Full`) and writing only the tenants it populates. Post-POC, OCR rides **`Full`** —
the only existing preset carrying the codec residues (HelixResidue + TurbovecResidue)
AND the hot columns the §4 writeback needs (Energy for confidence, Plasticity for the
repair stamp). `Compressed` lacks Energy/Plasticity and `Cognitive` lacks the
residues, so neither fits OCR (codex P2 on #500). A leaner OCR row would need an

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Align stale Compressed references with Full requirement

This correction now says post-POC OCR must ride Full because Compressed lacks Energy/Plasticity, but the same plan still tells implementers in §2 and the D-OCR-51 deliverable to use Full POC / Compressed. If the D-OCR-51 work follows those checklist lines, it can reintroduce the exact data-loss path this change is guarding against by selecting Compressed and dropping confidence/repair provenance, so the remaining summaries should be updated to Full or an operator-minted preset.

Useful? React with 👍 / 👎.

@AdaWorldAPI AdaWorldAPI merged commit 0f2f652 into main Jun 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants